<?php
$url=isset($_GET['url'])?$_GET['url']:'';
?>
<?php if(!empty($url)):?>
    <div class="btn-group"><a href="<?php echo $url; ?>" class="btn"> <i class="fa fa-arrow-left"></i> <?php echo lang('back_list')?> </a></div>
<?php else:?>
    <div class="btn-group"><a href="<?php echo site_url('user/index');?>" class="btn"> <i class="fa fa-arrow-left"></i> <?php echo lang('back_list')?> </a></div>
<?php endif;?>
<?php include_once 'inc_form_errors.php'; ?>

<div class="boxed">
    <h3> <i class="fa fa-plus"></i> <span class="badge badge-success pull-right"><?php echo $title; ?></span> <?php echo lang('add') ?></h3>
    <?php echo form_open(current_url(),array("class"=>"form-horizontal","id"=>"frm-create")); ?>

    <div class="boxed-inner seamless">
        <div class="control-group">
            <label class="control-label" for="uname">用户名：</label>
            <div class="controls">
                <input type="text" id="uname" name="uname" value="<?php echo set_value("uname") ?>" >
                <br/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="phone">手机号码</label>
            <div class="controls">
                <input type="text" id="phone" name="phone" value="<?php echo set_value("phone") ?>" >
                <br/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="pwd">密码</label>
            <div class="controls">
                <input type="password" id="pwd" name="pwd" value="<?php echo set_value("pwd") ?>" >
                <br/>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="pwdre">确认密码</label>
            <div class="controls">
                <input type="password" id="pwdre" name="pwdre" value="<?php echo set_value("pwdre") ?>" >
                <br/>
            </div>
        </div>

        <div class="clear"></div>

    </div>

    <div class="boxed-footer">
        <input type="submit" value=" <?php echo lang('submit'); ?> " class='btn btn-primary'>
        <input type="reset" value=' <?php echo lang('reset'); ?> ' class="btn btn-danger">
    </div>
    </form>
</div>

<?php include_once 'inc_ui_media.php'; ?>

<script type="text/javascript">
    require(['adminer/js/ui','adminer/js/media','bootstrap-datetimepicker.zh'],function(ui,media){
        // timepick
        $('.timepicker').datetimepicker({'language':'zh-CN','format':'yyyy/mm/dd hh:ii:ss','todayHighlight':true});
    });

</script>
